home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 April
/
CMCD0404.ISO
/
Software
/
Shareware
/
Programare
/
sharp
/
wwwSharp_setup.exe
/
{app}
/
Examples
/
Data access
/
MasterDetails
/
index.hta
< prev
next >
Wrap
Text File
|
2003-12-17
|
4KB
|
137 lines
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>wwwSharp.ClrHost master-details example</TITLE>
<META name="GENERATOR" content="MSHTML 6.00.2800.1264">
<META http-equiv="MSThemeCompatible" content="Yes">
<LINK href="MasterDetails.css" type="text/css" rel="stylesheet">
<OBJECT id="dsCustomersOrders" classid="clsid:A53ECD51-C062-4B08-97F0-4944CD7D88E7">
<PARAM name="XmlSchema" value="CustomersOrders.xsd">
<PARAM name="Xml" value="CustomersOrders.xml">
</OBJECT>
<OBJECT onrowenter="OnViewCustomersRowEnter();" id="viewCustomers"
classid="clsid:E3BC8FCA-E3F4-4B98-8627-9D3D343F9DA0">
<PARAM name="DataSetID" value="dsCustomersOrders">
<PARAM name="TableName" value="Customers">
</OBJECT>
<OBJECT id="viewOrders" classid="clsid:E3BC8FCA-E3F4-4B98-8627-9D3D343F9DA0"></OBJECT>
<SCRIPT language="JScript">
function viewCustomersMoveFirst()
{
viewCustomers.recordset.MoveFirst()
}
function viewCustomersMovePrevious()
{
viewCustomers.recordset.MovePrevious();
if (viewCustomers.recordset.BOF)
viewCustomers.recordset.MoveFirst();
}
function viewCustomersMoveNext()
{
viewCustomers.recordset.MoveNext();
if (viewCustomers.recordset.EOF)
viewCustomers.recordset.MoveLast();
}
function viewCustomersMoveLast()
{
viewCustomers.recordset.MoveLast();
}
function OnViewCustomersRowEnter()
{
viewOrders.DataView = viewCustomers.CreateChildView(viewCustomers.recordset.AbsolutePosition,
"Customers2Orders");
}
</SCRIPT>
</HEAD>
<BODY>
<H2>Customer:</H2>
<DIV id="divNavigation">
<BUTTON id="btnFirst" onclick="viewCustomersMoveFirst()">< <</BUTTON>
<BUTTON id="btnPrev" onclick="viewCustomersMovePrevious()"><</BUTTON>
<BUTTON id="btnNext" onclick="viewCustomersMoveNext()">></BUTTON>
<BUTTON id="btnLast" onclick="viewCustomersMoveLast()">> ></BUTTON>
</DIV>
<DIV id="divCustomer">
<TABLE id="tblCustomers" width="100%">
<TBODY>
<TR>
<TD class="tdHeader">Customer ID</TD>
<TD><SPAN dataFld="CustomerID" dataSrc="#viewCustomers"></SPAN></TD>
<TD class="tdHeader">Region</TD>
<TD><SPAN dataFld="Region" dataSrc="#viewCustomers"></SPAN></TD>
</TR>
<TR>
<TD class="tdHeader">Company Name</TD>
<TD><SPAN dataFld="CompanyName" dataSrc="#viewCustomers"></SPAN></TD>
<TD class="tdHeader">Postal Code</TD>
<TD><SPAN dataFld="PostalCode" dataSrc="#viewCustomers"></SPAN></TD>
</TR>
<TR>
<TD class="tdHeader">Contact Name</TD>
<TD><SPAN dataFld="ContactName" dataSrc="#viewCustomers"></SPAN></TD>
<TD class="tdHeader">Country</TD>
<TD><SPAN dataFld="Country" dataSrc="#viewCustomers"></SPAN></TD>
</TR>
<TR>
<TD class="tdHeader">Contact Title</TD>
<TD><SPAN dataFld="ContactTitle" dataSrc="#viewCustomers"></SPAN></TD>
<TD class="tdHeader">Phone</TD>
<TD><SPAN dataFld="Phone" dataSrc="#viewCustomers"></SPAN></TD>
</TR>
<TR>
<TD class="tdHeader">Address</TD>
<TD><SPAN dataFld="Address" dataSrc="#viewCustomers"></SPAN></TD>
<TD class="tdHeader">Fax</TD>
<TD><SPAN dataFld="Fax" dataSrc="#viewCustomers"></SPAN></TD>
</TR>
<TR>
<TD class="tdHeader">City</TD>
<TD><SPAN dataFld="City" dataSrc="#viewCustomers"></SPAN></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<H2>Orders:</H2>
<DIV id="divOrders">
<TABLE id="tblOrders" dataSrc="#viewOrders">
<THEAD>
<TR>
<TH>Order ID</TH>
<TH>Customer ID</TH>
<TH>Employee ID</TH>
<TH>Order Date</TH>
<TH>Required Date</TH>
<TH>Shipped Date</TH>
<TH>Ship Via</TH>
<TH>Freight</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD><SPAN dataFld="OrderID"></SPAN></TD>
<TD><SPAN dataFld="CustomerID"></SPAN></TD>
<TD><SPAN dataFld="EmployeeID"></SPAN></TD>
<TD><SPAN dataFld="OrderDate"></SPAN></TD>
<TD><SPAN dataFld="RequiredDate"></SPAN></TD>
<TD><SPAN dataFld="ShippedDate"></SPAN></TD>
<TD><SPAN dataFld="ShipVia"></SPAN></TD>
<TD><SPAN dataFld="Freight"></SPAN></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<DIV id="divFooter">
<P id="creator">Created with <A href="http://www-sharp.com/" target="_blank"><STRONG>
www-Sharp</STRONG></A>.</P>
</DIV>
</BODY>
</HTML>